@extends('layouts.app')

@section('content')
    @foreach($list as $k=>$v)

        <div class="card mb-lg-5">

            <div class="card-body">

                <div class="card-title">
                    <h4 class="text-primary text-center">{{$v->title}}</h4>

                </div>
                <div class="card-text">
                    {{\Illuminate\Support\Str::limit($v->content,400)}}
                </div>

            </div>
            <div class="card-footer">
                <div class="row">

                    <div class="col-md-3 text-center">
                        <span class="badge badge-secondary">{{$v->category['name']}}</span>
                    </div>

                    <div class="col-md-6 text-center">
                        @foreach((array)$v->label as $vv)
                            <span class="badge badge-success">{{$vv}}</span>

                        @endforeach
                    </div>

                    <div class="col-md-3 text-center">
                        <a href="{{route ('details',['id'=>$v->id])}}" class="link">查看全文</a>

                    </div>
                </div>

            </div>

        </div>

    @endforeach
    <div>
        {{ $list->links() }}
    </div>




@endsection
